<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@page contentType="text/html;charset=UTF-8" %>
<%@ include file="/commons/taglibs.jsp" %>
<html>
  <head>
    <title>${appname}</title>
	<%@include file="../meta.jsp"%>
	<script src="${ctx}/js/common/jquery-1.6.2.min.js" type="text/javascript"></script>
	<script language="javascript" type="text/javascript" src="${ctx}/js/lhgdialog/lhgdialog.min.js"></script>
  </head>
  
  <body>
    <div class="Teg_body">
    	<%@include file="../header.jsp"%>
    	
    	<div class="Teg_content">
    		<div class="content_left i-pane" id="zhd_LeftPane" paneid="LeftPane">
    			<div class="m-second-menu-title">
	    			<span class="Head">个人信息</span>
    			</div>
    			<div class="m-second-menu-ct ZHDAlignleft">
	    			<div class="accordion-3-container">
	    				<ul class="accordion-3">
	    					<li class="active"><div class="level-first"><a href="${ctx}/msgTips_my.do">我的消息</a></div></li>
	    					<li><div class="level-first"><a href="${ctx}/privateLog/list.do">个人日志</a></div></li>
	    				</ul>
	    			</div>
    			</div>
    			
    			<%@include file="../leftmenu.jsp"%>
    		</div>
    		<div class="content_right">
    			<div class="second_breadcrumb">
    				<span class="current_position">您的当前位置：<a href="${ctx}">首页</a>></span><span><a href="${ctx}/msgTips_my.do" class="SkinObject">我的消息</a></span>
    			</div>
    			<div class="content_ct i-pane" id="zhd_ContentPane" style="margin-top: 5px;">
    				<s:form action="/msgTips_my.do" method="post">
    				<div class="search_cond">
    					
    				</div>
    				<table width="100%" align="center" class="list-table" borderColor="#e3ecf6" bgColor="#e3ecf6" border="0" cellSpacing="1" cellPadding="0">
	    				<tr style="background: #f6fbff;" height="30">
	    					<td width="5%" align="center">序号</td>
	    					<td align="center">消息内容</td>
	    					<td width="10%" align="center">消息时间</td>
	    					<td width="8%" align="center">消息状态</td>
	    					<td width="16%" align="center">操作</td>
	    				</tr>
	    				<c:forEach items="${page.result}" var="item" varStatus="status">
						<tr height="30"${status.index%2 == 0?'class="gray"':''}>
							<td align="center">${page.thisPageFirstElementNumber + status.index}</td>
							<td align="left" class="sl">${item.content}</td>
							<td align="center">${item.xxsjString}</td>
							<td align="center">
								<c:if test="${item.zt == 0}">未读</c:if>
								<c:if test="${item.zt == 1}">已读</c:if>
							</td>
							<td align="center">
								<%--<a href="javascript:;" onclick="dkxx('${item.url}','${item.id}')">查看</a>&nbsp;--%>
								<a href="javascript:;" onclick="delTsxx('${item.id}')">删除</a>&nbsp;
							</td>
						</tr>
						</c:forEach>
						
						<c:if test="${fn:length(page.result)==0}">
						<tr>
					    	<td colspan="7"><div class="note_red_in_div">${notFoundData }</div></td>
					    </tr>
					    </c:if>
    				</table>
    				<input type="hidden" name="pageNumber" value="${page.thisPageNumber}"/>
					<input type="hidden" name="pageSize" value="${page.pageSize}"/>
					<simpletable:homePageToolbar page="${page}"/>
    				</s:form>
    			</div>
    		</div>
    		<div class="clear"></div>
    	</div>
    	<%@include file="../bottom.jsp"%>
    </div>
  </body>
</html>
<script type="text/javascript">
function dkxx(url,msgtipsid){
	parent.$.dialog({ 
	    id: 'xxnr', 
	    title:'信息详情',
	    content: 'url:'+url,
	    width:500, 
  		height:450,
  		min:false
	});
	
	
	$.getJSON('msgTips_update.do?id='+msgtipsid+'&zt=1&tempdate='+new Date().getTime(), function(result){
    	
    });
}
function delTsxx(id){
	if(!window.confirm("确定删除！")){
        return;
    }
	$.post('msgTips_delete.do?id='+id+'&zt=1&tempdate='+new Date().getTime(), function(responseXML){
		//window.location.href = "${ctx}/msgTips_my.do?timsStamp=" + curDate.getTime();
		location.replace("${ctx}/msgTips_my.do?timsStamp=" + new Date().getTime());
    });
}
var limitLength = 40;//限制多少个字数
limitLen();
function limitLen(){
	$(".sl").each(function(i, n) {
		var s = n.innerHTML;
		n.title = s;
		if(s.length>limitLength){
			n.innerHTML = s.substring(0,limitLength)+"...";
		}
		else if(s.length < limitLength){
			for(var c = s.length;c<limitLength+3;c++){//+3是因为后面三个...
				s += " ";	
			}
			$(this).innerHTML = s;
		}
	});
}
</script>